package com.xbongbong.process.feign;

import com.xbongbong.paas.pojo.vo.AfterSaveVO;
import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.process.pojo.dto.ProcessSaveDataDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 经销商审批通过处理
 * @author 吴峰
 * @date 2022/07/19 15:13
 */
@FeignClient(name = "pro-web-pc", contextId = "distributorProcessFeign")
public interface DistributorProcessFeign {

    /**
     * 新建通过审批
     *
     * @param processSaveDataDTO 新建
     * @param lang
     * @return
     * @throws
     * @author 吴峰
     * @date 2022/7/19 15:14
     */
    @RequestMapping(value = "/pro/v1/process/distributor/formDataAdd", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<AfterSaveVO> processAddFormData(@RequestBody ProcessSaveDataDTO processSaveDataDTO, @RequestParam("lang") String lang);

    /**
     * 更新通过审批
     *
     * @param processSaveDataDTO 更新
     * @param lang
     * @return
     * @throws
     * @author 吴峰
     * @date 2022/7/19 15:14
     */
    @RequestMapping(value = "/pro/v1/process/distributor/formDataUpdate", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<AfterSaveVO> processUpdateFormData(@RequestBody ProcessSaveDataDTO processSaveDataDTO, @RequestParam("lang") String lang);
}
